﻿using System;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;

namespace Contione.Microservices.Service02.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class HealthController : ControllerBase
    {
        private IConfiguration _iConfiguration;

        public HealthController(IConfiguration configuration)
        {
            this._iConfiguration = configuration; 
        }

        [HttpGet]
        public IActionResult Index()
        {
            Console.WriteLine($"Check Health {this._iConfiguration["port"]}");
            return Ok(this._iConfiguration["port"]);
        }
    }
}
